import { View } from "@tarojs/components";
import style from "./index.module.scss";

interface ShimmeringTextProps {
  text: string;
  textColor: string;
  type?: "none" | "gemstone";
}

export const ShimmeringText = ({
  text,
  textColor,
  type = "gemstone",
}: ShimmeringTextProps) => {
  return (
    <View
      className={`${style["shimmering-text"]} ${style[type]}`}
      style={{ color: textColor }}
    >
      <View className={style["shimmering-text-dot"]}></View>
      {text}
      <View className={style["shimmer"]} />
    </View>
  );
};
